package com.example.springstudy.web;

import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

//bug备注Application启动类的位置不对.要将Application类放在最外侧,即包含所有子包
//原因:spring-boot会自动加载启动类所在包下及其子包下的所有组件.
@RestController
public class HelloController {
    @RequestMapping("/hello")
    public String index(){
        return "Hello World";
    }

}
